<div class="eject_con">
  <div id="warning" class="alert alert-error"></div>
  <form id="post_form" method="post" action="index.php?act=store_silver&op=add">
    <input type="hidden" name="form_submit" value="ok" />
      <?php $member = $output['member'];?>
     <input type="hidden" name="member_id" value="<?php echo $member[0];?>" />
     <input type="hidden" name="member_name" value="<?php echo $member[1];?>" />
    <dl>
      <dt>会员姓名<?php echo $lang['nc_colon'];?></dt>
      <dd>
          <input class="text w200" type="text" name="member_truename" id="member_truename" value="<?php echo $member[2];?>" />
      </dd>
    </dl>

    <dl>
      <dt><i class="required">*</i>手机号码<?php echo $lang['nc_colon'];?></dt>
      <dd>
        <input class="text w200" type="text" name="member_mobile" id="member_mobile" value="<?php echo $member[3];?>" />
      </dd>
    </dl>
     <dl>
          <dt><i class="required">*</i>推荐会员数<?php echo $lang['nc_colon'];?></dt>
          <dd>
              <input class="text w50" type="text" name="affilite_num" id="affilite_num" value="<?php echo $member[4];?>" />
          </dd>
      </dl>
    <dl>
      <dt>银币信息<?php echo $lang['nc_colon'];?></dt>
      <dd>
        <input class="text w200" type="text" name="gift_content" id="gift_content" value="找金银网 纪念银币5g"   />
      </dd>
    </dl>
    <dl>
      <dt>发放数量<?php echo $lang['nc_colon'];?></dt>
      <dd>
          <input class="text w50" type="text" name="number" id="number" value="1"   />
      </dd>
    </dl>
    <div class="bottom">
        <label class="submit-border"><input type="submit" class="submit" value="发放" /></label>
    </div>
  </form>
</div>
<script type="text/javascript">
$(function(){

    $('#post_form').validate({
        errorLabelContainer: $('#warning'),
        invalidHandler: function(form, validator) {
            $('#warning').show();
        },
    	submitHandler:function(form){
          if($("#pay_status").val()==1){
              alert('该会员已经发放门票,请检查');
          }else if($("#pay_status").val()==2) {
              alert('会员尚未注册,请检查');
          }else{
              // $("#post_form").submit();
               ajaxpost('post_form', '', '', 'onerror');
          }
    	},
        rules : {
            mobile : {
                required   : true
            }
        },
        messages : {
            mobile  : {
                required   : '<i class="icon-exclamation-sign"></i>手机号码不能为空'
            }
        }
    });
});
</script>
